package com.tansun.easycare.move;

import org.eclipse.persistence.oxm.annotations.XmlCDATA;

/**
 * xml 元数据 规则对象
 *
 * @author WY
 */
public class RuleVo implements Comparable<RuleVo> {

    private String id;
    /**
     * 规则名
     */
    private String ruleName;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 优先级
     */
    private Integer salience;
    /**
     * 规则注释
     */
    @XmlCDATA
    private String comment;
    /**
     * 规则内容组织类型 formatObj : 由DWhen 和DThen 组成 simpleTxt ： 文本组成
     */
    private String txtType;
    /**
     * out(enabled true)
     */
    private String enabled;
    /**
     * 开始日期 out:(date-effective "24-Nov-2015")
     */
    private String dateEffective;
    /**
     * 结束日期 format: out:(date-expires "20-Nov-2015")
     */
    private String dateExpires;

    /**
     * 互斥组标记
     */
    private String activationGroup;

    /**
     * 所有人
     */
    private String owner;
    /**
     * 被授权人：user1;user2;user3;
     */
    private String users;
    /**
     * 加锁人
     */
    private String locker;
    private String creatorId;
    private String createDate;
    private String updatorId;
    private String updateDate;
    /**
     * 规则输出类型
     */
    private String ruleOutType;
    @XmlCDATA
    private String facts = "";
    @XmlCDATA
    private String evals = "";
    @XmlCDATA
    private String actions = "";

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getTxtType() {
        return txtType;
    }

    public void setTxtType(String txtType) {
        this.txtType = txtType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getSalience() {
        return salience;
    }

    public void setSalience(Integer salience) {
        this.salience = salience;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getDateEffective() {
        return dateEffective;
    }

    public void setDateEffective(String dateEffective) {
        this.dateEffective = dateEffective;
    }

    public String getDateExpires() {
        return dateExpires;
    }

    public void setDateExpires(String dateExpires) {
        this.dateExpires = dateExpires;
    }

    public String getActivationGroup() {
        return activationGroup;
    }

    public void setActivationGroup(String activationGroup) {
        this.activationGroup = activationGroup;
    }

    public String getFacts() {
        return facts;
    }

    public void setFacts(String facts) {
        this.facts = facts;
    }

    public String getEvals() {
        return evals;
    }

    public void setEvals(String evals) {
        this.evals = evals;
    }

    public String getActions() {
        return actions;
    }

    public void setActions(String actions) {
        this.actions = actions;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getUpdatorId() {
        return updatorId;
    }

    public void setUpdatorId(String updatorId) {
        this.updatorId = updatorId;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getUsers() {
        return users;
    }

    public void setUsers(String users) {
        this.users = users;
    }

    public String getLocker() {
        return locker;
    }

    public void setLocker(String locker) {
        this.locker = locker;
    }

    public String getRuleOutType() {
        return ruleOutType;
    }

    public void setRuleOutType(String ruleOutType) {
        this.ruleOutType = ruleOutType;
    }

    @Override
    public int compareTo(RuleVo arg0) {
        return this.getSort().compareTo(arg0.getSort()) * -1;
    }
}
